using System.IO;
using UnityEditor;
using UnityEngine;

public class ABBuilder
{
    [MenuItem("Build/AssetBundleForOpenHarmony")]
    public static void BuildAB()
    {
        string outputDir = Application.streamingAssetsPath + "/oh/";
        if (!Directory.Exists(outputDir))
            Directory.CreateDirectory(outputDir);
        BuildPipeline.BuildAssetBundles(outputDir, BuildAssetBundleOptions.ChunkBasedCompression,
            BuildTarget.OpenHarmony);
    }
}
